#include <bits/stdc++.h>

using namespace std;
#define int long long
const int inf = 0x3f3f3f3f3f3f3f3f;

void solve()
{
	int n;
	cin >> n;
	vector<int> a(n);
	for (int i = 0; i < n; i++) cin >> a[i];
	int mi = a[0];
	for (int i = 1; i < n; i++)
	{
		int x = ceil(a[i] / 2.0);
		if (x > mi || (x == mi && a[i] == 2 * mi))
		{
			cout << "No" << '\n';
			return;
		}
		mi = min(mi, a[i]);
	}
	cout << "Yes" << '\n';
}

/*
5
4
5 6 1 1
3
3 1 2
3
40 60 90
2
1 1
2
2 4

*/

signed main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int _ = 1;
	cin >> _;
	while (_--)
	{
		solve();
	}
	return 0;
}